package com.audaque.springboot.foshanupload.web.esdatademo.service;



import com.audaque.springboot.foshanupload.web.esdatademo.constant.MemberType;
import com.audaque.springboot.foshanupload.web.esdatademo.model.pojo.ChildCount;
import com.audaque.springboot.foshanupload.web.esdatademo.model.pojo.JoinFamily;
import io.swagger.annotations.ApiOperation;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.indices.CreateIndexRequest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentType;
import org.springframework.web.bind.annotation.GetMapping;

import java.io.IOException;
import java.util.List;

public interface JoinFamilyService {


     void creatIndex() throws Exception ;



    public String addGrandPa(String name);

    public String addFamilyMember(String parentId, String name, MemberType type);

    public String addParent(String grandPaId, String name);

    public String addChild(String parentId, String name);

    JoinFamily getFamilyTree(String grandPaId) throws IOException;

    public JoinFamily findFamilyMemberById(String id) throws IOException;

    List<ChildCount> getChildCountAndName( ) throws IOException;
}
